package main.dao;

import main.pojo.ChatMessage;

import java.sql.SQLException;
import java.util.List;

/**
 * 作者: ALIM-MASTIK
 * 创建实现: 2023/7/14 20:55
 * 项目名称：chat
 * 软件: IntelliJ IDEA
 */

public interface ChatMessageDAO {
    ChatMessage getChatMessageByID(int messageID);
    ChatMessage getChatMessageBySenderIDAndReceiverID(int SenderID,int ReceiverID);
    List<ChatMessage> getChatMessagesByUser(int userID);
    List<ChatMessage> getChatMessagesByChatRoom(int chatRoomID);
    List<ChatMessage> getAllChatMessages() throws SQLException;
    Boolean createChatMessage(ChatMessage chatMessage);
    Boolean updateChatMessage(ChatMessage chatMessage);
    Boolean deleteChatMessage(int messageID);
}
